package com.tianyi.sfzy1.mapper;

import com.tianyi.sfzy1.domain.Coursefavorite;
import com.tianyi.sfzy1.domain.Featuredarticle;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
* @author Lenovo
* @description 针对表【featuredarticle(精选文章表)】的数据库操作Mapper
* @createDate 2025-01-02 11:46:53
* @Entity com.tianyi.sfzy1.domain.Featuredarticle
*/
@Mapper
public interface FeaturedarticleMapper {

    //删除
    int deleteByPrimaryKey(int articleId);
    //新增
    int insert(Featuredarticle record);

    int insertSelective(Featuredarticle record);
    //根据id查询
    Featuredarticle selectByPrimaryKey(int articleId);

    //分页查询
    List<Featuredarticle> findByPage();
    int updateByPrimaryKeySelective(Featuredarticle record);
    //修改
    int updateByPrimaryKey(Featuredarticle record);
    //查询所有
    List<Featuredarticle> findAll();
    //模糊查询
//    List<Featuredarticle> findByTitle(String title);

    //根据咨询师id查询文章
    List<Featuredarticle> findByConsultantId(int consultantId);

    //   课程收藏表 和 咨询师表 查询
    List<Featuredarticle> findCourseFavoriteAndConsultant();
    //富文本编辑器上传
//    int insertFeaturedarticle(Featuredarticle featuredarticle);

    Featuredarticle findArticlebyId(int articleId);
}
